package org.hive.vmware.model;

import java.util.HashSet;
import java.util.Set;

public class VmGroupBee {

	private String id; // unique
	private Set<VmBee> vms = new HashSet<VmBee>();
	
	public void setId(String id) {
		this.id = id;
	}
	public String getId() {
		return id;
	}
	public void setVms(Set<VmBee> vms) {
		this.vms = vms;
	}
	public Set<VmBee> getVms() {
		return vms;
	}
	public boolean addVm(VmBee vm) {
		return vms.add(vm);
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof VmGroupBee) {
			VmGroupBee other = (VmGroupBee)obj;
			return getId().equals(other.getId());
		}
		return false;
		
	}
}
